package com.qifeng.modules.orderInfo.service;

import com.qifeng.common.base.BaseService;
import com.qifeng.modules.orderInfo.domain.OrderInfo;
import com.qifeng.modules.orderInfo.repository.OrderInfoRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by if on 2017/11/22.
 *
 * @author sunyifu
 */
@Service
@Transactional(readOnly = true)
public class OrderInfoService extends BaseService<OrderInfo, OrderInfoRepository, Long> {

    @Autowired
    private OrderInfoRepository repository;

    public List<OrderInfo> findByPostId(Long id) {
        return repository.findByPostId(id.intValue());
    }
}